//
//  UIView+HMXFrame.m
//  HMXBaisi
//
//  Created by apple on 16/6/15.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "UIView+HMXFrame.h"

@implementation UIView (HMXFrame)

-(void)setHmx_x:(CGFloat)hmx_x
{
    CGRect frame = self.frame;
    frame.origin.x = hmx_x;
    self.frame = frame;
}
-(CGFloat)hmx_x
{
    return self.frame.origin.x;
}

-(void)setHmx_y:(CGFloat)hmx_y
{
    CGRect frame = self.frame;
    frame.origin.y = hmx_y;
    self.frame = frame;
}
-(CGFloat)hmx_y
{
    return self.frame.origin.y;
}

-(void)setHmx_width:(CGFloat)hmx_width
{
    CGRect frame = self.frame;
    frame.size.width = hmx_width;
    self.frame = frame;
}
-(CGFloat)hmx_width
{
    return self.frame.size.width;
}

-(void)setHmx_height:(CGFloat)hmx_height
{
    CGRect frame = self.frame;
    frame.size.height = hmx_height;
    self.frame = frame;
}
-(CGFloat)hmx_height
{
    return self.frame.size.height;
}

-(void)setHmx_centerX:(CGFloat)hmx_centerX
{
    CGPoint point = self.center;
    point.x = hmx_centerX;
    self.center = point;
}
-(CGFloat)hmx_centerX
{
    return self.center.x;
}

-(void)setHmx_centerY:(CGFloat)hmx_centerY
{
    CGPoint point = self.center;
    point.y = hmx_centerY;
    self.center = point;
}
-(CGFloat)hmx_centerY
{
    return self.center.y;
}
@end
